import api from './api'

/**
 * 管理员用户相关api
 */
export class DashboardApi extends api {
  getDevCountList (d1, d2) {
    return this.request({
      url: 'backend/deviceCount',
      method: 'post',
      data: { beginTime: d1, endTime: d2 }

    })
  }

  getTemCountList (d1, d2) {
    return this.request({
      url: 'backend/temperatureCount',
      method: 'post',
      data: { beginTime: d1, endTime: d2 }
    })
  }

  getStatusCount () {
    return this.request({
      url: 'backend/statusCount',
      method: 'post'
    })
  }
}

export default new DashboardApi('dashboard')
